<template>
  <div>
    <div v-if="!actives">
        <!-- //图片 -->
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
          <van-swipe-item><img src="../image/36.jpg" style="width: 100%;height: 200px"/></van-swipe-item>
          <van-swipe-item><img src="../image/123.jpg" style="width: 100%; height: 200px"/></van-swipe-item>
          <van-swipe-item><img src="../image/jis4.jpg" style="width: 100%; height: 200px"/></van-swipe-item>
          <van-swipe-item><img src="../image/222.jpg" style="width: 100%; height: 200px" /></van-swipe-item>
          <van-swipe-item><img src="../image/rua.jpg" style="width: 100%; height: 200px "/></van-swipe-item>
        </van-swipe>

        <!-- 公告 -->
        <br>
        <van-notice-bar
          left-icon="volume-o"
          text="美滋滋"/>


        <!-- 社区 -->
        <br>
        <table width="100%">
          <tr>
            <td>
              &emsp;
              <van-icon name="comment-o" size="30px" color="#2E7BFC" />
            </td>
            <td>
              &emsp;

              <van-icon name="sign" size="30px" color="#FAB838"/>
            </td>
            <td>
              &emsp;
              <van-icon name="point-gift-o" size="30px" color="#F2674C"/>
            </td>
            <td>
              &emsp;

              <van-icon name="award-o" size="30px" color="#5AE1E6" />
            </td>
           
          </tr>
          <tr>
            <td><small>&emsp;交流社区</small></td>
            <td><small>&emsp;任务中心</small></td>
            <td><small>&emsp;推荐有奖</small></td>
            <td><small>&emsp;积分商城</small></td>
          </tr>
        </table>
       
        <!-- 开户 -->
        <br>
        <h3>万信推荐</h3>
          <div>
          &emsp;&emsp;&emsp;
          <table  width="100%" border="1px">
            <tr align="center">
              <td>
                <van-icon name="service-o" size="30px" color="#2E7BFC" />
              </td>
              <td>
                <van-icon name="send-gift-o" size="30px" color="#2E7BFC" />
              </td>
              <td>
                <van-icon name="balance-list-o" size="30px" color="#2E7BFC" />
              </td>
            </tr>
            <tr align="center">
              <td>
                <van-button  round block >
                  <span style="color:blue;" >注册账号</span>
                  </van-button>
              </td>
              <td>
                <van-button  round block @click="kaitong" >
                  <span style="color:blue;">开通存管</span>
                  </van-button>
              </td>
              <td>
                <van-button >
                  <span style="color:blue;">授权出错</span>
                  </van-button>
              </td>
            </tr>
          </table>
           

          
     
        



      </div>  



    </div>
    <!--  -->
    <div v-if="actives == 2">
      <Myuser>


      </Myuser>
    </div>
    <!--  -->
    <div v-if="actives == 3">
      <Exit></Exit>
    </div>
    <!--  -->
    <div>
      <van-tabbar v-model="actives" @change="onChange">
        <van-tabbar-item icon="home-o">主页</van-tabbar-item>
        <van-tabbar-item icon="search">标签 2</van-tabbar-item>
        <van-tabbar-item icon="friends-o">信息</van-tabbar-item>
        <van-tabbar-item icon="setting-o">标签 4</van-tabbar-item>
      </van-tabbar>
    </div>

  </div>
</template>

<script>
import Mynews from "./Mynews.vue";
import Myuser from "./Myuser.vue";
import Exit from "./Exit.vue";
export default {
  name: "",
  data() {
    return {
      active: 0,
      actives: 2,
    };
  },
  props: {},

  components: {
    Mynews,
    Myuser,
    Exit,
  },

  created() {},

  mounted() {
    this.showNews();
  },

  methods: {
    kaitong(){
        this.$router.push("/yin")
      },
    showNews() {
      console.log(">>>", this.active);
    },
    onChange(res){
      console.log(">>>>", res)
      this.actives = res
      // if (res == 0){
      //   this.$router.push('/')
      // } else if (res == 2){
      //   this.$router.push('/user')
      // }
    }
  },

  computed: {},

  watch: {},

  directives: {},

  filters: {},
};
</script>

<style scoped>
* {
  margin: 0;
}
</style>
